<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>17.1.BOM-BOM顶级对象window</title>
</head>

<body>
    <script>
        // 1.window 顶级对象
        // window.document.querySelector();

        // 2.window.属性
        var num = 10;
        console.log(window.num);
        console.log('---------------');

        // 3.window.函数
        function fn() {
            console.log(11);
        }
        window.fn();
        console.log('---------------');

        // 4.浏览器弹窗属于BOM，window可以省略
        window.alert('11');
        alert('11');
        console.log('---------------');

        console.dir(window);
        console.log('---------------');

        // 5.特殊属性 window.name
        console.log(window.name);
    </script>
</body>

</html>